<template>
	<view>
		<block v-for="(item, index) in xiazaifujian" :key="index">
			<view class="d-neikuang-10 d-shang-10  d-yuanjiao-10 " style="background-color: #f5f9ff;">
					<view class=" d-buhuanhang" >
						<view class="d-kuan-40 d-shang-4">
							<image :src="xiazaitu" class="d-img-40" ></image>
						</view>
						<view class="d-kuan d-zuo-10">
							<view v-if="xzzt==1" class="">免费下载</view>
							<view v-if="xzzt==2" class="">会员下载</view>
							<view v-if="xzzt==3" class="">统一付费</view>
							<view v-if="xzzt==4" class="">积分下载</view>
							<view v-if="xzzt==5" class="">点赞下载</view>
							<view v-if="xzzt==6" class="">评论下载</view>
							<view class="d-wenzi-12 d-wenzi-yanse-hui">{{item.title}}</view>
						</view>
						
						
						<view class="d-kuan-100">
							<view v-if="urlzhi == 1" class="d-shang-10 d-neirong-juzhong d-hanggao-25 d-wenzi-yanse-bai d-wenzi-14 d-beijing-hei d-yuanjiao-50 d-kuan-50 d-gao-26" @click="fujianurl(item.url)">下载</view>
							<view v-else class="d-shang-10 d-neirong-juzhong d-hanggao-25 d-wenzi-yanse-bai d-wenzi-14 d-beijing-hei d-yuanjiao-50 d-kuan-50 d-gao-26" @click="tiezi(acid,aid,urlzhi)">下载</view>
						</view>
						
					</view>
				<view class="d-clear"></view>
			</view>
		</block>
		<block v-for="(item, index) in yunxiazai" :key="index">
			<view class="d-neikuang-10 d-shang-10  d-yuanjiao-10 " style="background-color: #f5f9ff;">
					<view class=" d-buhuanhang">
						<view class="d-kuan-40 d-shang-4">
							<image :src="xiazaiyun" class="d-img-40" ></image>
						</view>
						<view class="d-kuan d-zuo-10">
							<view v-if="xzzt==1" class="">免费下载</view>
							<view v-if="xzzt==2" class="">会员下载</view>
							<view v-if="xzzt==3" class="">统一付费</view>
							<view v-if="xzzt==4" class="">积分下载</view>
							<view v-if="xzzt==5" class="">点赞下载</view>
							<view v-if="xzzt==6" class="">评论下载</view>
							<view v-if="item['3']" class="d-wenzi-12 d-wenzi-yanse-hui">{{item['1']}} 下载码：{{item['3']}}</view>
						    <view v-else class="d-wenzi-12 d-wenzi-yanse-hui">云盘下载</view>
						</view>
						<view class="d-kuan-100">
							<view v-if="urlzhi == 1" class="d-shang-10 d-neirong-juzhong d-hanggao-25 d-wenzi-yanse-bai d-wenzi-14 d-beijing-hei d-yuanjiao-50 d-kuan-50 d-gao-26" @click="yunurl(item['2'],item['3'])">下载</view>
							<view v-else class="d-shang-10 d-neirong-juzhong d-hanggao-25 d-wenzi-yanse-bai d-wenzi-14 d-beijing-hei d-yuanjiao-50 d-kuan-50 d-gao-26" @click="tiezi(acid,aid,urlzhi)">下载</view>
						</view>
					</view>
				<view class="d-clear"></view>
			</view>
		</block>
	</view>
	
	
</template>

<script>
	import config from "../../utils/config";
	export default{
		props:{
			aid: {
				type: [String, Number],
				default: ''
			},
			acid: {
				type: [String, Number],
				default: ''
			},
			xzzt: {
				type: [String, Number],
				default: ''
			},
			xiazaifujian:{
				type: [Array,Object],
				default() {
				  return {};
				}
			},
			yunxiazai:{
				type: [Array,Object],
				default() {
				  return {};
				}
			},
			urlzhi: {
				type: [String, Number],
				default: ''
			}
		},
		data(){
			return {
				xiazaitu:config.getDomain+'/static/default/quan/img/yasuo.png',
				xiazaiyun:config.getDomain+'/static/default/quan/img/yun.png',
			}
		},
		
		methods:{
			//帖子
			tiezi(cid,id,urlzhi) {
				if(urlzhi ==1) {
					this.$emit('xiazaifujian', cid,id);
				} else {
					this.$emit('tiezi', cid,id);
				}
			},
			// 附件
			fujianurl(url) {
				this.$emit('fujianurl', url);
			},
			//云url
			yunurl(url,ma) {
				this.$emit('yunurl', url,ma);
			}
		}
	}
</script>

<style lang="scss" scoped>
	
</style>
